<template>
    <div>
        <el-form label-position="right" label-width="80px" :inline="true" >
  <el-form-item label="时间范围">
     <el-date-picker
      v-model="value"
      type="daterange"
      range-separator="至"
      start-placeholder="开始日期"
      end-placeholder="结束日期">
    </el-date-picker >
      <el-form-item style="margin-left:15px">
    <el-button type="primary">查询</el-button>
  </el-form-item>
  </el-form-item>
        </el-form>
<div id="saledata"></div>
    </div>
</template>

<script>
import * as echarts from 'echarts' 
    export default {
        data(){
            return{
                value:''
            }
        },
        mounted(){
let  myChart = echarts.init(document.getElementById('saledata'))
myChart.setOption(
{
    tooltip: {
        trigger: 'item'
    },
    legend: {
        top: '5%',
        left: 'center'
    },
    series: [
        {
            name: '访问来源',
            type: 'pie',
            radius: ['40%', '70%'],
            avoidLabelOverlap: false,
            itemStyle: {
                borderRadius: 10,
                borderColor: '#fff',
                borderWidth: 2
            },
            label: {
                show: false,
                position: 'center'
            },
            emphasis: {
                label: {
                    show: true,
                    fontSize: '40',
                    fontWeight: 'bold'
                }
            },
            labelLine: {
                show: false
            },
            data: [
                {value: 1048, name: '订单总量'},
                {value: 735, name: '销售总量'},
                {value: 580, name: '商品数量'},
                {value: 484, name: '商品数据'},
                {value: 300, name: '入驻商家'}
            ]
        }
    ]
}
    
)
        }
        
    }
</script>

<style lang="less" scoped>
#saledata{
    width: 100%;
    height: 400px;
   
}

</style>